﻿@using ELTE.SEM.Data.ViewModels
@using ELTE.SEM.Data.Managers

@model SEMLogEntryViewModel
<div id="log-entry-add-container">
    <div id="log-entry-add-partial">
        @using (Html.BeginForm())
        {
            <fieldset>
                <div class="add-log-field">
                    <div class="add-log-label">
                        <span>Kezdődátum kiválasztása</span>
                        <div class="validation-error" id="error-begin-date"></div>
                    </div>
                    <div class="add-log-input" id="log-begin-date">
                        <div>@Html.Partial("DateSelector")</div>
                        <div>@Html.Partial("TimeSelector")</div>
                    </div>
                </div>
                <div class="add-log-field">
                    <div class="add-log-label">
                        <span>Végdátum kiválasztása</span>
                        <div class="validation-error" id="error-end-date"></div>
                    </div>
                    <div class="add-log-input" id="log-end-date">
                        <div id="log-end-date-check">
                            <span>Végdátum figyelembe vétele:</span>
                            @Html.Partial("MCheck")
                        </div>
                        <div>@Html.Partial("DateSelector")</div>
                        <div>@Html.Partial("TimeSelector")</div>
                    </div>
                </div>
                <div class="add-log-field" id="entry-part">
                    <div class="add-log-label">
                        <span>Kezdeti bejegyzés</span>
                        <div class="validation-error" id="error-begin-entry"></div>
                    </div>
                    <div class="add-log-input">
                        <div class="add-begin-entry">
                            <div class="styled-select">
                                <select>
                                    @{
                                        List<KeyValuePair<int, string>> entryTypes = new LogEntryManager().GetAvailableLogentryTypes();
                                        foreach (var item in entryTypes)
                                        {
                                        <option value="@item.Key">@item.Value</option>
                                        }
                                    }
                                </select>
                            </div>

                            <div class="begin-entry-container">
                                <textarea id="begin-log-entry" rows="1"></textarea>
                            </div>

                        </div>
                    </div>
                </div>

                <div class="add-log-field">
                    @*<button type="button" id="btn-log-add-submit" class="green-button">Új mérési esemény rögzítése</button>*@
                    <div class="add-log-input">
                        <div class="metro-submit" id="btn-log-add-submit">
                            <div>Mentés</div>
                        </div>
                    </div>
                </div>
            </fieldset> 
        }
    </div>
</div>
